package com.example.fistboot.demo;

public class Demo {
    public static void main(String[] args) {

        int a=0,b=0,c=0;

        for (int i = 0; i < 100; i++) {
            double v = Math.random() * 3;
            int v1 = (int) v;
            System.out.println(v1);
            switch (v1){
                case 0: a++;break;
                case 1: b++;break;
                case 2: c++;break;
            }
        }
        System.out.println("a结果："+a);
        System.out.println("b结果："+b);
        System.out.println("c结果："+c);
    }
}
